#!/bin/bash

# KIMI API Test Script
echo "=== KIMI API Connectivity Test ==="

# Check if KIMI_API_KEY is set
if [ -z "$KIMI_API_KEY" ]; then
    echo "❌ KIMI_API_KEY environment variable not set"
    echo "Please set: export KIMI_API_KEY='your_key_here'"
    exit 1
fi

echo "✅ KIMI_API_KEY found (${#KIMI_API_KEY} characters)"

# Compile and run the standalone tester
echo "🔍 Compiling and running KIMI API tester..."

# Run the standalone tester
java -cp target/classes:target/test-classes:$(mvn dependency:build-classpath -Dmdep.outputFile=/dev/stdout -q) com.opendeepsearch.KimiApiTester